<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

  <script type="text/javascript" >
  $(function(){
	  $("#tab2").hide();
	  $(".tabbable ul li:eq(0)").addClass("active");
	  $(".tabbable ul li:eq(0)").click(function(){
			 $(this).addClass("active");
			 $(".tabbable ul li:gt(0)").removeClass("active");
			 $(".tabbable ul li:lt(0)").removeClass("active");
			  $("#tab1").show();
			  $("#tab2").hide();
			  $("#tab3").hide();
		  });
		  $(".tabbable ul li:eq(1)").click(function(){
			  $(this).addClass("active");
				 $(".tabbable ul li:gt(1)").removeClass("active");
				 $(".tabbable ul li:lt(1)").removeClass("active");
			  $("#tab2").show();
			  $("#tab1").hide();
			  $("#tab3").hide();
		  });
		  $(".tabbable ul li:eq(2)").click(function(){
			  $(this).addClass("active");
				 $(".tabbable ul li:gt(2)").removeClass("active");
				 $(".tabbable ul li:lt(2)").removeClass("active");
			  $("#tab3").show();
			  $("#tab1").hide();
			  $("#tab2").hide();
		  });
  });

  
  </script>  
     <!-- 文章显示 -->
     <div class="span8" style='margin-left:0px;' id="content" >
        <div class="panel contentwordcolor" style="padding:20px">
           <h3 align="center">${nb.title }</h3>
           <p align="center" style='color:#999999 ;'>时间：${nb.publishDate }   ,作者： ${nb.reporter }</p>
           <hr>
           ${nb.content }
       </div>
    </div><!-- end of 文章显示 -->
    
    <!-- 相似文档 -->
     <div class="span4"  id="body-content">
	    <div class="panel"> 
	        
            <div style="border:2px;align:center;">
			<div class="tabbable">
				<!-- Only required for left/right tabs -->
				<ul class="nav nav-tabs">
					<li class="active"><a>最近新闻</a></li>
					<li><a>热点新闻</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" style='display: block;' id="tab1">
						<c:forEach items="${recentNews }" var="i">
						  <h3>
            <a target="_parent" href="<%=basePath %>nb/detail/${i.id}">${i.title }</a>
                        </h3>
						</c:forEach>
					</div>
					<div class="tab-pane" style='display: block;' id="tab2">
						<c:forEach items="${hotnews }" var="i">
						  <h3>
            <a target="_parent" href="<%=basePath %>nb/detail/${i.id}">${i.title }</a>
                        </h3>
						</c:forEach>
					</div>
				</div>
			</div>
		</div>
       </div>    
    </div><!-- end of 相似文档 -->
